<template>
	<view>
		<view class="topbanner">
			<image :src="dataAll.picUrl" class="topbanner" mode=""></image>
		</view>
		<view class="mainpadding ffffff">
			<view class="flexleft margin_top xiahuaxian" v-for="item in list" :key="item.id" @click="jumpdetail('/pages/index/shangpinxq?id=',item.id)">
				<image :src="item.picUrl" class="leftimg margin_right3" mode=""></image>
				<view class="flexcolumbet" style="height: 150rpx;align-items: flex-start;">
					<view class="main_size xiaohei xiankuan">{{item.name}}</view>
					<view class="main_size xiaohong ">￥{{item.retailPrice}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				list:[],
				listid:"",
				dataAll:{}
			}
		},
		onLoad(options) {
			this.listid = options.id
			this.init()
			this.getbanner()
		},
		methods: {
			getbanner(){
				httpRequest.request('/wx/topic/detail', 'GET', {
					id: this.listid,
				}).then(res => {
					this.dataAll = res.data.topic
				})
			},
			init() {
				httpRequest.request('/wx/topic/getTopicGoods', 'GET', {
					topicId: this.listid,
				}).then(res => {
					this.list = res.data
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.topbanner{
		width: 100%;
		height: 350rpx;
		border-radius: 30rpx;
	}
	.leftimg{
		min-width: 150rpx;
		width: 150rpx;
		height: 150rpx;
	}
</style>
